import request from '@/utils/request'

// 创建托盘信息
export function createTray(data) {
  return request({
    url: '/hs/tray/create',
    method: 'post',
    data: data
  })
}

// 更新托盘信息
export function updateTray(data) {
  return request({
    url: '/hs/tray/update',
    method: 'put',
    data: data
  })
}

// 删除托盘信息
export function deleteTray(id) {
  return request({
    url: '/hs/tray/delete?id=' + id,
    method: 'delete'
  })
}

// 获得托盘信息
export function getTray(id) {
  return request({
    url: '/hs/tray/get?id=' + id,
    method: 'get'
  })
}

// 获得托盘信息分页
export function getTrayPage(params) {
  return request({
    url: '/hs/tray/page',
    method: 'get',
    params
  })
}
// 导出托盘信息 Excel
export function exportTrayExcel(params) {
  return request({
    url: '/hs/tray/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}
